﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nebular.ExpenseManagement.Connector.Toolbox
{
    /// <summary>
    /// Set the attribute MapTo to indicate the desired reflected field og property copy. 
    /// 
    /// Since this is runtime, and without type check. Check and test for type copy errors.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple=true, Inherited=false)]
    public class MapToAttribute : System.Attribute
    {
        //Field name to map To
        private string _MapTo;

        //Get or Set required fieldname
        public string MapTo
        {
            get { return _MapTo; }
            set { _MapTo = value; }
        }

        /// <summary>
        /// Public constructor
        /// </summary>
        /// <param name="pMapTo">insert FieldName to be mapped to</param>
        public MapToAttribute(string pMapTo)
        {
            this._MapTo = pMapTo;
        }

    }
}
